<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>注册</title>
<script type="text/javascript" src="${root }/js/jquery-1.8.0.js"></script>
<script type="text/javascript" src="${root }/js/jquery.validate.js"></script>
<link rel="stylesheet" type="text/css" href="${root }/css/login.css">
</head>
<body>
	<header>
		<jsp:include page="WEB-INF/header.jsp"></jsp:include>
	</header>
	<div class="mainCon">
	<h1>登录</h1>
		<form action="UserModel/login.action" method="post" id="loginForm">
			<div><span>用户名：</span><input type="text" placeholder="请输入用户名" name="username" class="input1" id="username"></div>
			<div><span>密码：</span><input type="password" placeholder="请输入密码" name="pwd" class="input1" id="pwd"></div>
			<div class="error">${error }</div>
			<div><input type="submit" value="登录" class="btn1">asdfsdf</div>
		</form>
	</div>
	<jsp:include page="WEB-INF/footer.jsp"></jsp:include>
</body>
<script type="text/javascript">
	$(function() {
		/* 必填验证 */
		$("#loginForm").validate({
			rules : {
				username : "required",
				pwd : "required"
			},
			messages : {
				username : "请填写用户名",
				pwd : "请填写密码"
			},
			onfocusout : function(element) {
				$(element).valid();
			}
		});
	});
</script>
</html>